package Web.service;

import Web.domain.ResponseResult;
import Web.domain.dto.AddArticleDto;
import Web.domain.dto.ArticleDto;
import Web.domain.entity.Article;
import Web.vo.ArticleByIdVo;
import Web.vo.PageVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

public interface ArticleService extends IService<Article> {
    ResponseResult hotArticleList();
    ResponseResult getArticleDetail(Long id);

    ResponseResult newArticleList();

    //根据文章id从mysql查询文章
    ResponseResult updateViewCount(Long id);

    ResponseResult updatePraiseCount(Long id,Long status);

    ResponseResult getUserArticle(Long id);

    @Transactional
//    ResponseResult add(AddArticleDto articleDto);

    PageVo selectArticlePage(Article article, Integer pageNum, Integer pageSize);

    //①先查询根据文章id查询对应的文章
    ArticleByIdVo getInfo(Long id);

    //②然后才是修改文章
    void edit(ArticleDto articleDto);

    ResponseResult add(Article article);
}